From: Keir Fraser Date: Wed, 24 Feb 2010 10:46:49 +0000 (+0000) Subject: xm: Show usage message of xm commands X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12572 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=d8f8f35470499fdc74e688719ba55239c237acb0;p=xen.git xm: Show usage message of xm commands The following commands don't show an usage message even if we give a wrong option to the commands. - xm block-list - xm network-list - xm network2-list - xm vtpm-list - xm pci-list - xm scsi-list e.g. # xm block-list --xxx vm1 Error: option --xxx not recognized This patch shows the usage message of the commands. e.g. # xm block-list --xxx vm1 Error: option --xxx not recognized Usage: xm block-list [--long] List virtual block devices for a domain. Signed-off-by: Masaki Kanno --- diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 73e868f2cb..0c2f942d79 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -2122,7 +2122,7 @@ def arg_check_for_resource_list(args, name): (options, params) = getopt.gnu_getopt(args, 'l', ['long']) except getopt.GetoptError, opterr: err(opterr) - sys.exit(1) + usage(name) for (k, v) in options: if k in ['-l', '--long']: